<?php 
	$action = Configure::read('Config.status');
	if($action != 'active'){
		Router::connect('/', array('controller' => 'pages', 'action' => 'display', $action));
	}else{
		Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'index'));
	}
	
					
	// logowanie	
	Router::connect('/login', array('controller' => 'users', 'action' => 'login'));
	Router::connect('/logout', array('controller' => 'users', 'action' => 'logout'));

	Router::connect('/:language/login', 
						array('controller' => 'users', 'action' => 'login'),
						array('language' => '[a-z]{3}'));
	
	Router::connect('/:language/logout', 
						array('controller' => 'users', 'action' => 'logout'),
					array('language' => '[a-z]{3}'));						
	
	Router::connect('/:language/pages/*', 
						array('controller' => 'pages', 'action' => 'display'),
						array('language' => '[a-z]{3}'));

	// controllers
	Router::connect('/:language/:controller/:action/*',
                       array(),
                       array('language' => '[a-z]{3}'));